package duotai;

import java.util.Scanner;

/**
 * @Author admin
 * @Date 2019/3/19 16:32
 */
public class Test {
    public static void main(String[] args) {
        Driver driver=new Driver();
        BMW bmw =new BMW();
        QQ qq=new QQ();
        System.out.println("请选择你要开哪辆车");
        System.out.println("1--BMW");
        System.out.println("2--QQ");
        Scanner sc=new Scanner(System.in);
        String xz=sc.nextLine();


        GongChang gc=new GongChang();
        Car car=gc.getCar(xz);
        car.run();

        
       /* Car car;
        if (xz.equals("1")){
            car=new BMW();
        }else {
            car=new QQ();
        }

        car.run();*/


    }
}
